LinuxCNC

On the Rpi open a terminal (Ctl Alt t) and do the following ::

wget https://github.com/jethornton/rpi4/releases/download/1.0/linuxcnc-uspace_2.9.0.pre1_armhf.deb
sudo apt install linuxcnc-uspace_2.9.0.pre1_armhf.deb

Check your latency with

latency-histogram --nobase

If it’s over 100 edit the cmdline.txt file

sudo nano /boot/cmdline.txt

Add isolcpus=1,2,3 idle=poll to the end of the string then press Ctrl x, y, Enter

Logout and Reboot

For even better latency

sudo nano /boot/config.txt

Set arm_freq=1500 and add force_turbo=1

Comment out

# Enable audio (loads snd_bcm2835)

#dtparam=audio=on

# Automatically load overlays for detected cameras

#camera_auto_detect=1

then press Ctrl x, y, Enter